import Vue from 'vue'
import VueRouter from 'vue-router'
// 路由组件
// const LayoutPage = () => import('@/views/layout')
// const LoginPage = () => import('@/views/login')
// import PeopleManage from '@/views/PeopleManage'
Vue.use(VueRouter)

// const routes = [
//   { path: '/', component: LayoutPage , },
//   { path: '/login', component: LoginPage }
// ]

const router = new VueRouter({
  routes: [
    {
      path: '/',
      component: () => import('@/views/layout'),
      redirect: '/liecharts',
      children: [
        { path: 'liecharts', component: () => import('@/views/echarts') },
        // 点位管理3个页面的路由
        { path: 'nodeRegion', component: () => import('@/views/point/region') },
        { path: 'nodeNode', component: () => import('@/views/point/node') },
        { path: 'nodePartner', component: () => import('@/views/point/partner') },
        { path: 'devicemanager', component: () => import('@/views/device-manager') },
        { path: 'devicestate', component: () => import('@/views/device-state') },
        { path: 'devicetype', component: () => import('@/views/device-type') },
        { path: 'sku', component: () => import('@/views/sku/skuA') },
        { path: 'sku-class', component: () => import('@/views/sku/sku-class') },
        { path: 'order', component: () => import('@/views/order/indexA') },
        { path: 'business', component: () => import('@/views/task/BusinessTask') },
        { path: 'operation', component: () => import('@/views/task/OperationTask') },
        { path: 'strategy', component: () => import('@/views/strategy/StrategyManage') },
        { path: 'account', component: () => import('@/views/account/AccountManage') },
        { path: 'PeopleManage', component: () => import('@/views/people/PeopleList') },
        { path: 'PeopleCount', component: () => import('@/views/people/PeopleCount') },
        { path: 'WorkList', component: () => import('@/views/people/WorkList') }
      ]
    },
    { path: '/login', component: () => import('@/views/login') }

  ]
})

export default router
